//
//  NSString+Extension.m
//  QQ
//
//  Created by 张亚 on 16/1/21.
//  Copyright © 2016年 zhangya. All rights reserved.
//

#import "NSString+Extension.h"

@implementation NSString (Extension)

- (CGSize) sizeWithFont:(UIFont *)font maxSize:(CGSize)maxSize{
    NSDictionary * attrs = @{NSFontAttributeName : font};
    return [self boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:attrs context:nil].size;

}



@end
